<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
     <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<script type="text/javascript">
$(document).ready(function(){
	var faqCategory="";
/* 	$("#faqCategory").change(function(){
		faqCategory=$(this).val();
		$("#faqTitle").val("["+faqCategory+"] ");
		}); */
	$("#faqOkBtn").click(function(){
		if(confirm("글을 등록하시겠습니까?")){
			$("#faqWriteForm").submit();
		}else{
				return false;
			}
	});
});
</script>

<form id="faqWriteForm" method="post" action="${initParam.root }faq.do">
<input type="hidden" name="command" value="writeBoard">
<table>
	<tr>
		<td>카테고리</td>
		<td>
		<select id="faqCategory" name="category">
			<option value="" >--선택하세요--</option>
			<option value="가입/탈퇴" >가입/탈퇴</option>
			<option value="개인정보" >개인정보</option>
			<option value="포인트 결제" >포인트 결제</option>
			<option value="물품 판매" >물품 판매</option>
			<option value="물품 구매" >물품 구매</option>
			<option value="게시판 이용" >게시판 이용</option>
			<option value="기타" >기타</option>
		</select>
		</td>
		<td></td>
	</tr>
	<tr>
		<td>제목</td>
		<td colspan="2"><input type="text" size="44" id="faqTitle" name="title" placeholder="제목을 입력하세요"></td>
	</tr>
	<tr>
		<td>파일첨부</td>
		<td><input type="text" id="faqId" name="id"></td>
		<td><input type="button" id="faqFileBtn" value="첨부" ></td>
	</tr>
	<tr>
		<td colspan="3"><textarea  id="faqContent" name="content" rows="20" cols="50" placeholder="내용을 입력하세요"></textarea></td>
	</tr>
	<tr>
		<td></td>
		<td></td>
		<td>
			<input type="submit" id="faqOkBtn" value="등록">
			<input type="button" id="faqCancleBtn" value="취소">
		</td>
	</tr>
</table><br>
</form>
